package com.fuhaiwei.basic.utils;

public class Logger {
	private final String LINE = "| | | | | | | | | | | | | | | | | | ";
	private int count;

	private org.apache.log4j.Logger logger = org.apache.log4j.Logger
			.getRootLogger();

	public void debug(Object message) {
		logger.debug(LINE.substring(0, count) + message);
	}

	public void info(Object message) {
		logger.info(LINE.substring(0, count) + message);
	}

	public void warn(Object message) {
		logger.warn(LINE.substring(0, count) + message);
	}

	public void error(Object message) {
		logger.error(LINE.substring(0, count) + message);
	}

	public void enter(Object message) {
		logger.info(LINE.substring(0, count) + message);
		count += 2;
	}

	public void back(Object message) {
		count -= 2;
		logger.info(LINE.substring(0, count) + message);
	}

}